package com.itany.book.service.impl;

import com.itany.mapper.PressMapper;
import com.itany.pojo.Press;
import com.itany.service.PressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Author：sl
 * Date：2019-09-23 下午4:34
 * Description：<描述>
 */
@Service
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Throwable.class)
public class PressServiceImpl implements PressService {

    @Autowired
    private PressMapper pressMapper;

    @Transactional(readOnly = true)
    public List<Press> findAll() {
        List<Press> presses = pressMapper.selectAll();
        return presses;
    }
}
